package antidestiny.utilib;

import android.os.Environment;

import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * Created by Hero on 2015/8/13.
 */
public class TimeUtils {
    public String getCurrentDate(){
        SimpleDateFormat sdf=new SimpleDateFormat(" yyyy-MM-dd ");
        Date date=new Date();
        return sdf.format(date);


    }
    public String getCurrentTime(){
        SimpleDateFormat sdf=new SimpleDateFormat(" HH:mm ");
        return  sdf.format(new Date());

    }
    public String getCurrentTimeAndSenconds(){
        SimpleDateFormat sdf=new SimpleDateFormat( " HH:mm:ss ");
        return sdf.format(new Date());
    }
    public String getDateAndTime(long millis){
        SimpleDateFormat sdf=new SimpleDateFormat(" yyyy-MM-dd HH:mm ");
        String s=sdf.format(new Date(millis));
        return  s;
    }
}
